from django.conf.urls import patterns, include, url
from django.conf import settings

from django.contrib import admin

from rest_framework import routers
from rest_framework.authtoken import views


router = routers.DefaultRouter(trailing_slash=False)

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include(router.urls)),
    url(r'^users/', include('users.urls')),
    url(r'^api-token-auth/', views.obtain_auth_token),
]

if settings.DEBUG:
    urlpatterns += [url(r'^docs/', include('rest_framework_swagger.urls'))]
